﻿using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace MemoBoss
{
    public class ScoreItemViewModel : INotifyPropertyChanged
    {
        private int _Color;

        public int Color
        {
            get
            {
                return _Color;
            }
            set
            {
                if (value != _Color)
                {
                    _Color = value;
                    NotifyPropertyChanged("Color");
                }
            }
        }

        private int _Number;

        public int Number
        {
            get
            {
                return _Number;
            }
            set
            {
                if (value != _Number)
                {
                    _Number = value;
                    NotifyPropertyChanged("Number");
                }
            }
        }

        private int? _Rank;

        public int? Rank
        {
            get
            {
                return _Rank;
            }
            set
            {
                if (value != _Rank)
                {
                    _Rank = value;
                    NotifyPropertyChanged("Rank");
                }
            }
        }

        private String _User;
        /// <summary>
        /// Sample ViewModel property; this property is used in the view to display its value using a Binding.
        /// </summary>
        /// <returns></returns>
        public String User
        {
            get
            {
                return _User;
            }
            set
            {
                if (value != _User)
                {
                    _User = value;
                    NotifyPropertyChanged("User");
                }
            }
        }

        private int? _Score;
        /// <summary>
        /// Sample ViewModel property; this property is used in the view to display its value using a Binding.
        /// </summary>
        /// <returns></returns>
        public int? Score
        {
            get
            {
                return _Score;
            }
            set
            {
                if (value != _Score)
                {
                    _Score = value;
                    NotifyPropertyChanged("Score");
                }
            }
        }

        private int? _Level;
        /// <summary>
        /// Sample ViewModel property; this property is used in the view to display its value using a Binding.
        /// </summary>
        /// <returns></returns>
        public int? Level
        {
            get
            {
                return _Level;
            }
            set
            {
                if (value != _Level)
                {
                    _Level = value;
                    NotifyPropertyChanged("Level");
                }
            }
        }

        public event PropertyChangedEventHandler PropertyChanged;
        private void NotifyPropertyChanged(String propertyName)
        {
            PropertyChangedEventHandler handler = PropertyChanged;
            if (null != handler)
            {
                handler(this, new PropertyChangedEventArgs(propertyName));
            }
        }
    }
}